﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wedo.Recognition.Domain.Models;

namespace Wedo.Recognition.Domain.Mapping
{
    public class PaymentApply_Mapping: EntityConfiguration<PaymentApply>
    {
        public PaymentApply_Mapping()
        {
            ToTable("PaymentApply");

            HasRequired(b =>b.BankData).WithMany(m=>m.PaymentApply).HasForeignKey(b => b.BankDataId);

            Property(s => s.OrderNum).HasMaxLength(500);
            Property(s => s.Note).HasMaxLength(500);
            Property(s => s.BillingNo).HasMaxLength(500);
            Property(s => s.ContractNo).HasMaxLength(500);

            Property(s => s.Approver).HasMaxLength(50).HasColumnType("nvarchar");
            Property(s => s.ApplyMan).HasMaxLength(50).HasColumnType("nvarchar");
            Property(s => s.CustomerCode).HasMaxLength(50).HasColumnType("nvarchar");
            Property(s => s.CustomerName).HasMaxLength(50).HasColumnType("nvarchar");

            Property(s => s.ReleaseOrder).HasMaxLength(50).HasColumnType("nvarchar");
            Property(s => s.Division).HasMaxLength(50).HasColumnType("nvarchar");
        }
    }
}
